package com.example.demo.vo.user;

import com.example.demo.po.user.User;
import lombok.Data;
import org.springframework.lang.NonNull;

@Data
public class UserVO {

    private String username;

    private String password;

    private int role;

    private double ability;

    private int preferencePerformance;

    private int preferenceFunction;

    private int deviceWindows;

    private int deviceMac;

    private int deviceLinux;

    private int deviceAndroid;

    private int deviceIos;


    private int takeTaskNum;

    public UserVO() {
    }

    public UserVO(@NonNull User user) {
        this.username = user.getUsername();
        this.password = user.getPassword();
        this.role=user.getRole();
        this.ability=user.getAbility();
        this.preferencePerformance=user.getPreferencePerformance();
        this.preferenceFunction=user.getPreferenceFunction();
        this.deviceMac=user.getDeviceMac();
        this.deviceWindows = user.getDeviceWindows();
        this.deviceLinux = user.getDeviceLinux();
        this.deviceAndroid = user.getDeviceAndroid();
        this.deviceIos = user.getDeviceIos();
        this.takeTaskNum = user.getTakeTaskNum();
    }

    public UserVO(String username){
        this.username=username;
    }
}